package com.beiwei.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.beiwei.auto.mode.Role;
import com.beiwei.auto.mode.RoleExample;
import com.beiwei.mapper.VRoleMapper;

@Service
public class RoleService {

	@Autowired
	private VRoleMapper vRoleMapper;

	/**
	 * 查询所有的角色
	 */
	public List<Role> findAllRole() throws Exception {

		RoleExample example = new RoleExample();
		RoleExample.Criteria criteria = example.createCriteria();
		criteria.andRoleIdNotEqualTo(4);
		criteria.andDelFlagEqualTo(0);

		return vRoleMapper.selectByExample(example);
	}

}
